//
// Copyright (C) Microsoft. All rights reserved.  
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not 
// use this file except in compliance with the License.  You may obtain a copy 
// of the License at http://www.apache.org/licenses/LICENSE-2.0  
// 
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
// MERCHANTABLITY OR NON-INFRINGEMENT. 
//
// See the Apache License, Version 2.0 for specific language governing 
// permissions and limitations under the License.
//
//
#include "quad_common.hlsli"

struct pixelShaderInput
{
    float4 point0 : SV_Position;
    float2 uv0 : TEXCOORD;
};

struct pixelShaderOutput
{
    float4 fragment : SV_Target;
};

pixelShaderOutput main(pixelShaderInput p)
{  
    pixelShaderOutput result;

    result.fragment = Texture1.Sample(TextureSampler, float2(p.uv0.x, p.uv0.y));
    float x = p.uv0.x - 0.5;
    float y = p.uv0.y - 0.5;

    float dist = 0.707 - sqrt(x*x + y*y);

    dist += 0.6;
    result.fragment *= dist;
    result.fragment.a = 1;
    return result;
}
